package com.example.smartcitydemo

import android.app.Application
import android.content.SharedPreferences
import android.os.Handler
import android.os.Looper

/**
 * @PACKAGE_NAME: com.example.smartcitydemo
 * @NAME: Caleb.F
 * @DATE: 2021/11/3 16:14
 * @Email: 1919796283@qq.com
 */
class MyApplication : Application() {

    override fun onCreate() {
        super.onCreate()
        instance = this
        sp = this.getSharedPreferences("smartCity", MODE_PRIVATE)
        handler = Handler(Looper.getMainLooper())
    }

    companion object {
        lateinit var instance: MyApplication
        lateinit var sp: SharedPreferences
        lateinit var handler: Handler
    }
}